-
-
Notifications
You must be signed in to change notification settings - Fork 539
GhostTree new logic level insane, take a cup of java before reviewing this #3334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
0ff1a00
to
8f8e968
Compare
|
src/badguy/ghosttree.cpp
Outdated
|
||
switch (color) { | ||
case ATTACK_RED: | ||
willowisp.set_color(Color(1, 0, 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the constants in Color
class...
Color::RED, etc.
Can you show a video? |
ghosttree.zip |
Not bad. I'd like to see some intermediate frames for the animation. |
Also, the mouth opening should be earlier, before the willowisps are moving towards the mouth. |
Thanks for your feedback! Intermediate frames would be nice, indeed, but we're unlikely to get them in reasonable time. I was not provided any sucking animation, so that's why it looks this weird. As an alternative solution, the tree could suck the wisp through his eyes. Nevertheless, I would rather wait now for the rest of the team, whether they have any comments to the visuals. |
imma test this |
(re-post cause i put it under the wrong pr) also just to mention it before someone else does, it feels really unpolished rn, but that doesnt matter because its very blatantly unfinished and its just important to get the basic behavior down first, and the visual polishing with stuff like particle animations can just be done later or in another pr. So yeah little johnny dont be commenting "why is the ghost tree so bad,,,... or whatever" lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looking at the code as-is, it seems good to me; I left a few comments, but you're free to ignore them lol. I didn't try to follow a lot of the higher-level flow; I assume if it plays fine and doesn't crash then things should be fine there. Let me know if you need me to test the build as well.
) | ||
(action | ||
(name "flying-right") | ||
(hitbox 11 12 70 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason that the shape of the hitbox changes? 11 vs 15?
if ((mystate == STATE_SUCKING) && (willowisp->was_sucked)) { | ||
mystate = STATE_IDLE; | ||
GhostTree::rotate_willo_color() { | ||
m_next_willo = static_cast<AttackType>((static_cast<int>(m_next_willo) + 1) % 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a case / else-if tree to avoid treating enums like integers?
while (m_willo_to_spawn--) { | ||
spawn_willowisp(m_attack); | ||
} | ||
m_attack = static_cast<AttackType>(static_cast<int>(m_attack) + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I don't love treating the enum like an integer; I don't mind it that much here, but I think it would be worth adding a comment in the header that the order of the elements in the enum is important (maybe that's why you have ATTACK_RED = 0
, idk). On the other hand it just generally feels like a bad idea to be relying on the ordering of the enum.
m_parent(parent) | ||
{ | ||
m_physic.set_velocity_y(-RED_ROOT_SPEED); | ||
const int variant = abs(static_cast<int>(pos.x)) % 3 + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just RNG?
see #3217